package mason.dp.abstractfactory.factory;

import mason.dp.abstractfactory.computer.Computer;
import mason.dp.abstractfactory.computer.MacBook;
import mason.dp.abstractfactory.computer.MacComputer;

/**
 * 苹果计算机工厂
 * @author MasonAir
 *
 */
public class MacComputerFacotry implements ComputerFactory {

	@Override
	public Computer createComputer(String type) {
		Computer c = null;
		ComputerComponentFactory ccf = new MacComponentFactory();
		if (type.equals("笔记本")) {
			c = new MacBook("苹果笔记本", ccf);
		} else if (type.equals("台式机")) {
			c = new MacComputer("苹果台式机", ccf);
		}
		return c;
	}

}
